package com.lg.wxq.manager;

import java.util.ArrayList;

import com.lg.wxq.bean.Task;

public class TaskManager {
	private ArrayList<Task> allTask;
	private ArrayList<Task> allImageTask;
	
	private static TaskManager instance=new TaskManager();
	
	private TaskManager(){
		allTask=new ArrayList<Task>();
		allImageTask=new ArrayList<Task>();
	}
	
	public static TaskManager getInstance(){
		return instance;
	}
	
	public ArrayList<Task> getImageTaskArray(){
		return allImageTask;
	}
	
	public ArrayList<Task> getTaskArray(){
		return allTask;
	}
	
	public int getSize(){
		return allTask.size();
	}
	public int getImages(){
		return allImageTask.size();
	}
	
	public Task getTask(int index){
		return allTask.get(index);
	}
	
	public Task getFirstImageTask(){
		return getImageTask(0);
	}
	
	public Task getImageTask(int index){
		return allImageTask.get(index);
	}
	
	public void addTask(Task ts){
		allTask.add(ts);
	}
	
	public void addImage(Task ts){
		allImageTask.add(ts);
	}

	public void removeTask(Task ts) {
		allTask.remove(ts);
	}

	public void removeImage(Task task) {
		allImageTask.remove(task);
	}
}
